package com.zxn.kotlin.method

/**
 * 静态方法的函数使用
 */
class Factory {
    companion object{

        val onIntent = { intent: String -> intent.length }

        fun onIntent(intent: String,blcok:(Int) -> Unit) {
            val length = intent.length
            blcok(length)
        }

        fun onParseIntent(userId: Int) {
            println("userId1:$userId")
        }

        fun onGetIntent(userId: Int) {
            println("userId2:$userId")
        }

        fun onIntent2(intent: String,blcok:(Int,Int) -> Unit) {
            val length = intent.length
            blcok(length,length)
        }

        fun onParseIntent2(userId1: Int,userId2: Int) {
            println("userId1:$userId1,userId2:$userId2")
        }
    }
}